package com.yuyu.excel.utils;

import com.alibaba.ttl.TransmittableThreadLocal;

public class TenantContextHolder {

    private static final TransmittableThreadLocal<String> transmittableThreadLocal = new TransmittableThreadLocal<>();

    public static void setTenantId(String tenantId) {
        transmittableThreadLocal.set(tenantId);
    }

    public static String getTenantId() {
        return transmittableThreadLocal.get();
    }

    public static void remove() {
        transmittableThreadLocal.remove();
    }
}
